package example12_9;

public class SubThread extends Thread{
    int i=0;
    public void run(){
        System.out.println("启动线程"+Thread.currentThread().getName());
        while(true){
            System.out.println("运行线程"+Thread.currentThread().getName()+"，输出i的值："+i);
            if(i==4)
                break;
            i++;
        }
        System.out.println(Thread.currentThread().getName()+"运行结束");
    }
}
